import { FormSchema } from '@/components/Table'
import { getDictListByCode } from '@/api/sys/dict'

export const searchFormSchema: FormSchema[] = [
  {
    field: 'operType',
    label: '操作类型',
    component: 'ApiSelect',
    colProps: { span: 6 },
    componentProps: {
      api: getDictListByCode,
      params: 'data_oper_type',
      labelField: 'itemName',
      valueField: 'itemCode',
    },
  },
]

export const columns = [
  {
    title: '操作类型',
    dataIndex: 'operName',
  },
  {
    title: '操作标签',
    dataIndex: 'tag',
  },
  {
    title: '操作人',
    dataIndex: 'createUserName',
  },
  {
    title: '操作时间',
    dataIndex: 'createTime',
  },
]

export const modalColumns = [
  {
    title: '标签',
    dataIndex: 'tag',
  },
  {
    title: '标签数据日期',
    dataIndex: 'createTime',
  },
  {
    title: '修改前值',
    dataIndex: 'oldData',
  },
  {
    title: '修改后值',
    dataIndex: 'newData',
  },
]
